package org.linlinjava.litemall.wx.vo.cart;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

@Data
@ApiModel(value="购物车可用优惠券")
public class CartAvailableCartCouponsRespVO {

	@ApiModelProperty(value = "id")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;

	@ApiModelProperty(value = "优惠券类型")
	private Integer couponType;

	@ApiModelProperty(value = "名字")
	private String name;

	@ApiModelProperty(value = "图片")
	private String pictureUrl;

	@ApiModelProperty(value = "描述")
	private String descr;

	@ApiModelProperty(value = "兑换码")
	private String code;

	@ApiModelProperty(value = "最小值")
	private BigDecimal min;

	@ApiModelProperty(value = "折扣")
	private BigDecimal discount;

	@ApiModelProperty(value = "开始时间")
	private LocalDateTime startTime;

	@ApiModelProperty(value = "结束时间")
	private LocalDateTime endTime;

	@ApiModelProperty(value = "折扣类型")
	private Byte discountType;

	@ApiModelProperty(value = "折现率")
	private Byte discountRate;

	@ApiModelProperty(value = "使用说明")
	private String useInstruction;

	@ApiModelProperty(value = "使用限制 | 年月日 限制 1234")
	private Short useLimit;

	@ApiModelProperty(value = "限制数量,该字段和use_limit相关")
	private Integer useLimitNum;

	//拆分的限制

	@ApiModelProperty(value = "地区限制")
	private List<String> limitRegionslist = new ArrayList<>();
	/**
	 * 限制商品如下
	 */
	private List<String> limitGoods = new ArrayList<>();
	/**
	 * 限制分类如下
	 */
	private List<String> limitCategories = new ArrayList<>();
	/**
	 * 其他说明如下
	 */
	private List<String> limitUseInstruction = new ArrayList<>();

}
